[IA64] Fix isr setting vs viosapic interupt delivery
authorawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Tue, 20 Mar 2007 15:21:47 +0000 (09:21 -0600)
committerawilliam@xenbuild2.aw <awilliam@xenbuild2.aw>
Tue, 20 Mar 2007 15:21:47 +0000 (09:21 -0600)
When the HVM guest is used with vcpu=5, the hypervisor may report:
"redir 10 not set for 180 EOI", and the HVM guest is Hung.

When the hypervisor with a vcpu context delivers to another vcpu,
EOI might be sent before ISR is set.

We should modify to call viosapic_delver() after ISR setting.

Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
xen/arch/ia64/vmx/viosapic.c

index f52a1f65904c218b6fc4aabccdaa067245751b81..bed4e2bec640aafc45c1e18c994b52172860da83 100644 (file)
@@ -104,11 +104,11 @@ static void service_iosapic(struct viosapic *viosapic)
 
     while ( (irq = iosapic_get_highest_irq(viosapic)) != -1 )
     {
-        viosapic_deliver(viosapic, irq);
-
         if ( viosapic->redirtbl[irq].trig_mode == SAPIC_LEVEL )
             viosapic->isr |= (1UL << irq);
 
+        viosapic_deliver(viosapic, irq);
+
         viosapic->irr &= ~(1UL << irq);
     }
 }